<script>
import store from '@/common/store/index.js'
import socket from '@/plugins/socket';
// #ifdef H5
import { h5Login } from '@/plugins/html5Utils';
// #endif
	export default {
		onLaunch: function() {
		//取出缓存数据
		//store.commit('setCacheData');
		// #ifdef MP-WEIXIN
		if (store.state.user.tokenInfo) {
			socket.init();
		}
		// #endif
		// #ifdef H5
		if (store.state.user.tokenInfo) {
			socket.init();
		} else {
			h5Login('force', () => {
				socket.init();
			});
		}
		// #endif
		// #ifdef APP-PLUS
		if (store.state.user.tokenInfo) {
			socket.init();
		}
		//APPUpdate();
		// #endif
		
		
		},
		onShow: function(e) {
			
			//获取二维码携带的参数
			let scene = decodeURIComponent(e.query.scene);
			scene = scene.split('&');
			let data = {
				//场景值
				scene: e.scene
			};
			scene.forEach(item => {
				let arr = item.split('=');
				if (arr.length == 2) {
					data[arr[0]] = arr[1];
				}
			});
			
			store.commit('setChatScenesInfo', Object.assign(e.query, data));
			
		},
		onHide: function() {
			console.log('App Hide')
		},

	}
</script>

<style lang="scss">
	@import "static/font/custom-icon.css";
    /* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
	page,body{
		background: $u-bg-color;
	}
	.font-weight-bold {
		font-weight: 700 !important;
	}
	.float_right{float: right; display: inline-block;}
	.flexbottom{
		position:fixed;bottom: 0rpx; width: 100%;
		background: $u-bg-color;
		padding-bottom: 70rpx;
		padding-top: 20rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;
		border-top: 0px solid $u-border-color;
		text-align: center;
	}
	.base-tonglan-box{
         .htitle_s2{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 20rpx;
		 }
         .htitle{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 20rpx;
		 background: $u-cell-hover;
		 font-weight: bold; font-style: normal;
		 border-bottom:1px solid $u-border-color-light;
		 font-size: 30rpx;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 20rpx 20rpx 20rpx 0rpx;
			 border-radius: 100%;
			 background:$u-cell-bg;
			 border: solid 1px $u-border-color-light;
			 .u-icon{
				 color: $u-type-primary;
				 
			 }
		 }
		 }
		.item{
			line-height: 50rpx;
			color: $u-content-color;
			position: relative;
			box-sizing: border-box;
			padding: 18rpx 20rpx;
		}
		.item:after {
		  position: absolute;
		  /* #ifndef APP-NVUE */
		  box-sizing: border-box;
		  content: " ";
		  pointer-events: none;
		  border-bottom: 0.4rpx solid $u-border-color;
		  /* #endif */
		  right: 0;
		  left: 0;
		  bottom: 0;
		}
		.item:last-child {
			&:after{
				border-bottom: 0px;
			}
		}
	}
	
		.htitle{ 
		 font-weight: bold; font-style: normal;
		 font-size: 30rpx;
		 min-height: 80rpx;
		 line-height: 80rpx;
		 color: $u-content-color;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 10rpx 10rpx 10rpx 0rpx;
			 border-radius: 100%;
			 background:#E4BB7B;
			 border: solid 1px #E4BB7B;
			 .u-icon{
				 color: #FFFFFF;
				 
			 }
		 }
		 }
		 
	.base-panel-box{
		position: relative;
		border-radius: 24rpx;
		padding: 0rpx;
		border: 1px solid $u-border-color-light;
         .htitle_s2{
		 min-height: 80rpx;
		 line-height: 80rpx;
		 padding: 0rpx 20rpx;
		 }
		.htitle{ 
		 background: $u-cell-hover;
		 font-weight: bold; font-style: normal;
		 border-bottom:1px solid $u-border-color-light;
		 border-radius: 18rpx 18rpx 0rpx 0rpx;
		 font-size: 30rpx;
		 min-height: 80rpx;
		 line-height: 80rpx;
		 color: $u-content-color;
		 padding: 0rpx 20rpx;
		 i{
			 display: inline-block;
			 width: 50rpx;height: 50rpx;line-height: 50rpx;
			 text-align: center;
			 margin: 10rpx 10rpx 10rpx 0rpx;
			 border-radius: 100%;
			 background:$u-cell-bg;
			 border: solid 1px $u-border-color-light;
			 .u-icon{
				 color: $u-type-primary;
				 
			 }
		 }
		 .u-tag{padding: 4rpx 20rpx;background: #5338DD;}
		}
		.right{
			 float: right;line-height: 80rpx;height: 80rpx;margin-right: 20rpx;font-size: 20rpx;
		 }
		.item_single{
			padding: 18rpx 20rpx;
		}
		.item{
			/*border-left: solid 1px #EAECF7;
			border-right: solid 1px #EAECF7;*/
			background:$u-cell-bg;
			color: $u-content-color;
			position: relative;
			box-sizing: border-box;
			padding: 18rpx 20rpx;
			&.yuan{
				border-radius:24rpx 24rpx 0rpx 0rpx ;
			}
		}
		.item:after {
		  position: absolute;
		  /* #ifndef APP-NVUE */
		  box-sizing: border-box;
		  content: " ";
		  pointer-events: none;
		  border-bottom: 0.4rpx solid $u-border-color-light;
		  /* #endif */
		  right: 0;
		  left: 0;
		  bottom: 0;
		}
		.item:last-child {
			border-radius: 0rpx 0rpx 18rpx 18rpx;
			&:after{
				border-bottom: 0px;
			}
		}
	}
	
	.u-load-more-wrap{
		padding: 50rpx;
	}

	.b-b {
		position: relative;
	}

	.b-b::after {
		position: absolute;
		z-index: 0;
		right: 0;
		bottom: 0;
		left: 0;
		height: 0.5px;
		content: '';
		-webkit-transform: scaleY(.5);
		-ms-transform: scaleY(.5);
		transform: scaleY(.5);
		background-color: $u-border-color;
	}
	.fixedbottom{
		position:fixed;bottom: 50rpx; width: 100%;
		padding-bottom: 50rpx;
	}
.page-wrap {
	.page-header {
		padding: 30rpx 40rpx;
		margin-bottom: 0rpx;
		.page-title {
			text-align: left;
			font-size: 40rpx;
			font-weight: 600;
			margin-bottom: 10rpx;
			color: $u-main-color;
		}

		.page-desc {
			color: $u-tips-color;
		}
	}
	
	.page-body {
		padding: 0rpx;
	}
}

     .mytoptonglan{
		font-weight: bold; font-style: normal;
		background: linear-gradient(96.25deg, #9849F1 20.55%, #E517F9 78.85%);
		color: #FFFFFF;
		line-height: 180%;
		.bg{
			background:url() no-repeat bottom right;
			background-size: 50% 90%;
			padding: 50rpx 0rpx 60rpx 0rpx;
		}
		.bigtitle{
			font-size: 40rpx;
		}
	 }
	 .mybasebox{
		 background: #ffffff;
		 padding-top: 20rpx;
		 border-radius: 30rpx 30rpx 0rpx 0rpx;
		 margin-top: -20rpx;
	 }
	 .piaofu{
		 position: absolute;
		 top:250rpx;
		 left:48%;
	 }
	 .u-load-more-wrap{
	 	padding: 50rpx;
	 }
</style>